import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { IonContent } from "@ionic/angular";

@Component({
  selector: 'app-content',
  templateUrl: './content.page.html',
  styleUrls: ['./content.page.scss'],
})
export class ContentPage implements OnInit {
  @ViewChild(IonContent) content: IonContent;

  list = ["Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item","Item"]
  constructor(private router: Router) { 
     
  }

  ngOnInit() {
  }

  gotohome(){
    this.router.navigate(['/'])
  }

  logScrollStart(){
    console.log("执行logScrollStart");
  }
  logScrolling(e){
    console.log("执行logScrolling");
  }
  logScrollEnd(){
    console.log("执行logScrollEnd");
  }
  scrollToBottom(){
    this.content.scrollToBottom(1000);
  }
  scrollToTop(){
    this.content.scrollToTop(1000);
  }

}
